import java.util.Scanner;
public class 练习三 {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int random = (int) (Math.random() * 101);
            int count = 0;
            int guess1 = 0;
            int guess2 = 100;
            for (int i = 0; i < 101; i++) {
                System.out.print("请输入您猜的数字（0~100）：");
                int guess = scanner.nextInt();
                count++;
                if (guess == random) {
                    if (count == 1) {
                        System.out.println("你真厉害，一次就猜对了！");
                        break;
                    } else if (count == 2 || count == 3 || count == 4) {
                        System.out.println("你很聪明，猜对了！");
                        break;
                    } else {
                        System.out.println("笨蛋，你猜这么多次");
                        break;
                    }
                }else {
                    if (guess > random) {
                        System.out.println("太大了！！！" );
                    } else if (guess < random) {
                        System.out.println("太小了！！！" );
                    }
                }

            }
        }
}
